﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoApp.ResultModel;
using Volo.Abp.Application.Services;

namespace TodoApp.TMS_maintain.TNS_Violation
{
    public class TMS_VioAppService : ApplicationService
    {
        private readonly ITNS_Violations _ITMS_repairs;
        public TMS_VioAppService(ITNS_Violations ITMS_repairs)
        {
            _ITMS_repairs = ITMS_repairs;
        }

        public async Task<PageResponse<TNS_ViolationDto>> GetVio(string Viotitel, string VioNumber, int pageindex = 1, int pagesize = 5)
        {
            return await _ITMS_repairs.GetVio(Viotitel, VioNumber, pageindex, pagesize);
        }

        public async Task<int> VioAdds(TNS_ViolationDto info)
        { 
            return await  _ITMS_repairs.VioAdds(info);
        }

        public async Task<int> DeletVio(string Id)
        {
            return await _ITMS_repairs.DeletVio(Id);
        }

        public async Task<int> UpdateVioup(TNS_ViolationDto tMS_Induction)
        { 
            return await _ITMS_repairs.UpdateVioup(tMS_Induction);
        }
    }
}
